class Player(object):
    # 统计玩家数量
    number = 0  # 类属性

    def __init__(self, name, age):
        self.name = name  # 实例属性
        self.age = age
        Player.number += 1

    def introduce(self):
        print("我是LOL的第%d个玩家，我的名字是%s" % (Player.number, self.name))

    @classmethod  # 类方法
    def get_players(cls):
        print("LOL用户数量一共是%d人" % cls.number)

    @staticmethod
    def is_valid(**kwargs):
        if kwargs.get('age') >= 18:
            return True
        else:
            return False


infos = {'name': 'jack', 'age': 16}
if Player.is_valid(**infos):
    jack = Player(infos['name'],infos['age'])
    print(jack.__dict__)
else:
    print('未成年禁止玩游戏')
